home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 5
/
Gold Medal Software - Volume 5 (Gold Medal) (1995).iso
/
windows
/
misc
/
tapecalc.arj
/
ABOUTBOX.TXT
< prev
next >
Wrap
Text File
|
1994-10-20
|
10KB
|
329 lines
VERSION 2.00
Begin Form FAB
BorderStyle = 3 'Fixed Double
Caption = "About INIBAK"
ClientHeight = 3825
ClientLeft = 1575
ClientTop = 720
ClientWidth = 6240
FillColor = &H00FFFFFF&
Height = 4350
Left = 1515
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3825
ScaleWidth = 6240
Top = 255
Width = 6360
Begin PictureBox IconPicture
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 480
Left = 240
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 1
Top = 240
Width = 480
End
Begin CommandButton CommandOK
Cancel = -1 'True
Caption = "OK"
Default = -1 'True
Height = 315
Left = 5400
TabIndex = 0
Top = 120
Width = 735
End
Begin Label OptLabel
BorderStyle = 1 'Fixed Single
Height = 30
Index = 5
Left = 960
TabIndex = 18
Top = 2160
Width = 4335
End
Begin Label OptLabel
BorderStyle = 1 'Fixed Single
Height = 30
Index = 2
Left = 960
TabIndex = 17
Top = 1440
Width = 4335
End
Begin Label OptLabel
Caption = "FSRs"
Height = 255
Index = 14
Left = 3120
TabIndex = 16
Top = 3480
Width = 2295
End
Begin Label OptLabel
Caption = "System Resources:"
Height = 255
Index = 13
Left = 960
TabIndex = 15
Top = 3480
Width = 2055
End
Begin Label OptLabel
Caption = "Dos Version"
Height = 255
Index = 7
Left = 960
TabIndex = 14
Top = 2520
Width = 2295
End
Begin Label OptLabel
Caption = "Win Version"
Height = 255
Index = 6
Left = 960
TabIndex = 13
Top = 2280
Width = 2175
End
Begin Label OptLabel
Caption = "Math Coproc"
Height = 255
Index = 12
Left = 3120
TabIndex = 12
Top = 3240
Width = 2175
End
Begin Label OptLabel
Caption = "Math Co-processor:"
Height = 255
Index = 11
Left = 960
TabIndex = 11
Top = 3240
Width = 2055
End
Begin Label OptLabel
Caption = "Memory"
Height = 255
Index = 10
Left = 3120
TabIndex = 10
Top = 3000
Width = 2175
End
Begin Label OptLabel
Caption = "Memory:"
Height = 255
Index = 9
Left = 960
TabIndex = 9
Top = 3000
Width = 2055
End
Begin Label OptLabel
Caption = "Win Mode"
Height = 255
Index = 8
Left = 960
TabIndex = 8
Top = 2760
Width = 4335
End
Begin Label NameLabel
Caption = "Name Label"
Height = 255
Left = 960
TabIndex = 2
Top = 120
Width = 4275
End
Begin Label OptLabel
Caption = "Company Name"
Height = 255
Index = 4
Left = 960
TabIndex = 7
Top = 1800
Width = 4275
End
Begin Label OptLabel
Caption = "User Name"
Height = 255
Index = 3
Left = 960
TabIndex = 6
Top = 1560
Width = 4275
End
Begin Label OptLabel
Caption = "Extra 2"
Height = 255
Index = 1
Left = 960
TabIndex = 5
Top = 1140
Width = 4275
End
Begin Label OptLabel
Caption = "Extra 1"
Height = 255
Index = 0
Left = 960
TabIndex = 4
Top = 840
Width = 4275
End
Begin Label CoprLabel
Caption = "Copyright Label"
Height = 255
Left = 960
TabIndex = 3
Top = 540
Width = 4275
End
Begin Shape Shape1
BackColor = &H80000008&
FillColor = &H00FFFFFF&
FillStyle = 0 'Solid
Height = 735
Left = 120
Top = 120
Width = 735
End
End
Option Explicit
' To use the generic About Box defined in this file, your MAK file must
' also include the module ABOUTBOX.BAS. Just call the function
' DisplayAboutBox, passing parameters specific to your program. DO NOT
' load the form FAB prior to calling DisplayAboutBox!
' This re-usable component was originally created by Neil
' J. Rubenking for the PC Magazine utility INIBAK.
Sub CommandOK_Click ()
Unload FAB
End Sub
Function FixAmpersand$ (ByVal Buffer$)
Dim N%
N = 1
Do Until N = 0
N = InStr(N, Buffer, "&")
If N > 0 Then
Buffer = Left$(Buffer, N) + Mid$(Buffer, N)
N = N + 2
End If
Loop
FixAmpersand = Buffer
End Function
Sub Form_Load ()
Dim Version&, WinVer
' The 4 bytes of the Long returned by GetVersion encode the Windows
' and DOS version number in this order, from low byte to high byte:
' Windows major version number, Windows minor version number,
' DOS minor version number, DOS major version number.
Version = GetVersion()
WinVer = ((Version And &HFF) * 100) + ((Version \ &H100) And &HFF)
' The functions used to get the user name, company name, and FSR
' percentage aren't available in Windows versions before 3.1. If
' this is an earlier version, add those items to the exclude list.
If WinVer < 310 Then
Excl = Excl Or AB_NO_USER Or AB_NO_COMPANY Or AB_NO_FSR
End If
' If both user and company are excluded, eliminate the separator
If Excl And (AB_NO_USER Or AB_NO_COMPANY) Then
EliminateLabel 2
Else
' Get access to USER's strings by getting a handle to USER
Dim hInstUser%
hInstUser = LoadLibrary("USER")
FreeLibrary hInstUser
End If
Dim Buffer$''', Success%, N%
' Get the User name, if wanted
If Excl And AB_NO_USER Then
EliminateLabel 3
Else
Buffer = String$(31, 0)
If LoadString(hInstUser, 514, Buffer, 30) Then
OptLabel(3).Caption = FixAmpersand(Buffer)
End If
End If
' Get the Company name, if wanted
If Excl And AB_NO_COMPANY Then
EliminateLabel 4
Else
Buffer = String$(31, 0)
If LoadString(hInstUser, 515, Buffer, 30) Then
OptLabel(4).Caption = FixAmpersand(Buffer)
End If
End If
Dim V$
' Show Windows version, if wanted
If Excl And AB_NO_WINVER Then
EliminateLabel 6
Else
V = "Windows " + Format$(Version And &HFF)
V = V + "." + Format$((Version \ &H100) And &HFF, "00")
OptLabel(6).Caption = V
End If
' Show DOS version, if wanted
If Excl And AB_NO_DOSVER Then
EliminateLabel 7
Else
V = "DOS " + Format$((Version \ &H1000000) And &HFF)
V = V + "." + Format$((Version \ &H10000) And &HFF, "00")
OptLabel(7).Caption = V
End If
Dim WinFlags&
WinFlags = GetWinFlags()
' Show Windows mode, if wanted
If Excl And AB_NO_WINMODE Then
EliminateLabel 8
Else
If WinFlags And WF_ENHANCED Then
OptLabel(8) = "386 Enhanced Mode"
ElseIf WinFlags And WF_PMODE Then
OptLabel(8) = "Standard Mode"
Else
OptLabel(8) = "Real Mode"
End If
End If
' Show Memory, if wanted
If Excl And AB_NO_MEMORY Then
EliminateLabel 9
OptLabel(10).Visible = False
Else
Dim FreeSpace&
FreeSpace = GetFreeSpace(0)
OptLabel(10).Caption = Format$(FreeSpace \ 1024, "#,###,##0") + " KB Free"
End If
' Show 80x87 presence, if wanted
If Excl And AB_NO_80x87 Then
EliminateLabel 11
OptLabel(12).Visible = False
Else
If WinFlags And WF_80x87 Then
OptLabel(12) = "Present"
Else
OptLabel(12) = "Absent"
End If
End If
' Show FSRs, if wanted
If Excl And AB_NO_FSR Then
EliminateLabel 13
OptLabel(14).Visible = False
Else
OptLabel(14) = Format$(GetFreeSystemResources(GFSR_SYSTEMRESOURCES)) + "% Free"
End If
End Sub